🌻 AI answers panel#

Requires an AI subscription

You can open this panel by clicking the corresponding tab lower down on the right-hand side of the app.

🤖 What you can do here: Ask questions about your data in plain English and get AI-powered answers. Type questions like "What are the main barriers to education?" and the AI will search through your currently selected sources to provide relevant answers with supporting quotes. Perfect for exploring themes and getting quick insights from large amounts of text.

Main Features:

Search Modes#

AI Answers offers two search modes, automatically optimized based on your data size:

Full Sources Mode#

Searches the complete text of your sources (documents/interviews).

How it works:

  1. Type a question about the text of the currently selected sources
  2. System automatically chunks sources into searchable segments (if not already done)
  3. Searches through document chunks using AI embeddings and semantic similarity
  4. Most relevant chunks are sent to AI for analysis
  5. AI generates answers with supporting quotes from your sources

Question expansion and HyDE (Hypothetical Document Embeddings)

This is now optional:

When expansions are provided, we match each phrase against chunks and sum scores per chunk, then select the top \(n\) by the max_chunks slider.

So for example if the user asks what is the connection between money and happiness, the AI produces question variants like:

And answer variants like:

Best for: Exploratory questions about raw text, finding themes not yet coded, discovering new patterns.

Searches only through your coded causal links and their surrounding context (the quote + 3 sentences before/after).

How it works:

  1. Gets filtered links from your current filter pipeline (respects Sources dropdown and all Source Groups filters)
  2. For each link, extracts the selected quote plus surrounding context
  3. Organizes contexts by source, with source metadata (title, custom columns)
  4. For ≤500 links: Sends all contexts directly to AI
  5. For >500 links: Uses backend semantic search to find most relevant contexts
  6. Embeddings generated server-side (via find-relevant-contexts edge function)
  7. Also uses question expansion (see above)
  8. Similarity calculation done server-side using cosine similarity
  9. Only relevant context indices returned to frontend
  10. No memory/computation overhead in browser
  11. AI analyzes contexts showing cause → effect relationships
  12. AI uses the cause/effect labels in its narrative (ignoring any original labels if links were recoded)

Context format sent to AI:

'## Source: Interview with Participant 001
ID: ABC-123
custom_Country: Kenya | custom_Gender: Female | custom_Age: 34

Links from this source:

[ABC-123-1] Lack of resources → Poor school performance
Context: "We don't have enough books or supplies. The children struggle because..."

[ABC-123-2] Teacher training → Better outcomes
Context: "When teachers receive proper training, we see improvements in..."

Best for: Questions about causal relationships you've already coded, comparing patterns across sources, analyzing specific demographic groups using Source Groups filters.

Key advantages of Link Contexts mode:

etc etc